/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2022-10-26
 * Time: 22:27
 */

public class AA {
    public static void main1(String[] args) {
        System.out.println("Hello World!");
        System.out.println(100);
        System.out.println(3.14);
        System.out.println('A');
        System.out.println(true);
        System.out.println(false);
    }

    public static void main2(String[] args) {
        final int a = 10;
        System.out.println(a);
    }

    public static void main3(String[] args) {
        double d = 3.14;
        System.out.println(d);
    }

    public static void main4(String[] args) {
        int a = 1;
        int b = 2;
        System.out.println(a / b); // 输出 0.5 吗？
    }

    public static void main5(String[] args) {
        double num = 1.1;
        System.out.println(num * num); // 输出1.21吗？
    }

    public static void main6(String[] args) {
        float num = 1.0f; // 这样对吗？
        System.out.println(num);
    }

    public static void main7(String[] args) {
        char c1 = 'a'; // 小写字母
        char c2 = '1'; // 数字字符
        char c3 = '帅';
        char c4 = 97;//数字？java中的字符可以存放整形吗？
        System.out.println(c1);
        System.out.println(c2);
        System.out.println(c3);
        System.out.println(c4);
    }

    public static void main8(String[] args) {
        boolean b = true;
        System.out.println(b);
        boolean a = false;
        System.out.println(a);
        boolean c = false;
        System.out.println(c);
    }
    public static void main9(String[] args) {
        String s1 = "hello";
        String s2 = " world";
        System.out.println(s1);
        System.out.println(s2);
        System.out.println(s1+s2); // s1+s2表示：将s1和s2进行拼接
    }

    public static void main10(String[] args) {
        int num = 10;
        // 方法1
        String str1 = num + "";
        // 方法2
        String str2 = String.valueOf(num);
        System.out.println(str1);
        System.out.println(str2);
    }

    public static void main(String[] args) {
        String str = "100000";
        int num = Integer.parseInt(str);
        System.out.println(num);
    }
}
